<?php
/**
 * @param String titulo
 * @param array cabecalhos
 * @param array r
 */
?>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	</head>
	<body>
<?php
if (!empty($this->titulo)) {
?>
		<h1><?php echo $this->titulo; ?></h1>
<?php
}
foreach ($this->r as $campo => $valor) {
	if(empty($valor)) {
		continue;
	}
	if (is_array($valor)) {
		$valor = '<br />' . implode('<br />', $valor);
	}
	$campo = (empty($this->cabecalhos[$campo])) ? $campo : $this->cabecalhos[$campo];
	$campo = ucfirst(utf8_decode(str_replace('_', ' ', $campo))); 
?>
		<p>
			<strong><?php echo $campo; ?>:</strong> <?php echo nl2br($valor); ?>
		</p>
<?php
} 
?>
	</body>
</html>